package com.media.appmedia.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;

import com.media.appmedia.util.TelListener;

public class PhoneBootReceiver extends BroadcastReceiver {

	@Override
	public void onReceive(Context context, Intent intent) {
//		if(intent.getAction().equals(Intent.ACTION_NEW_OUTGOING_CALL)){
//		     String phoneNumber = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
//		     
//		}else{
//		BaseApplication.getApplication().stopLockService();
//		BaseApplication.getApplication().finishLock();
		TelephonyManager telM = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);
		telM.listen(new TelListener(context), PhoneStateListener.LISTEN_CALL_STATE);  
//		}
	}
}
